<?php
/**
 * Class descript.
 * User: chan
 * Date: 2017/10/20 11:22
 */

namespace app\api\controller;
class Index extends Base
{
      //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'only' => ''
        ],
    ];


    /**
     * 轮播图
     */
    public function banner()
    {
        $result =  (new \app\api\logic\Index())->banner();
        return $this->ajaxReturn($result);
    }
    /**
     * 分类
     */
    public function category()
    {
        $result =  (new \app\api\logic\Index())->category();
        return $this->ajaxReturn($result);
    }
    /**
     * 精推荐店铺菜品
     */
    public function recommend()
    {
        $result =  (new \app\api\logic\Index())->recommend();
        return $this->ajaxReturn($result);
    }
    /**
     * 精推菜品
     */
    public function menu()
    {
        $result =  (new \app\api\logic\Index())->menu();
        return $this->ajaxReturn($result);
    }
    /**
     * 推荐商家
     */
    public function home()
    {
        $result =  (new \app\api\logic\Index())->home();
        return $this->ajaxReturn($result);
    }
    /**
     * 关于我们
     */
    public function about()
    {
        $result =  (new \app\api\logic\Index())->contract();
        return $this->ajaxReturn($result);
    }

    /**
     * 联系我们
     */
    public function contact()
    {
        $result =  (new \app\api\logic\Index())->contact();
        return $this->ajaxReturn($result);
    }
    /**
     * 搜索
     */
    public function search()
    {
        $result =  (new \app\api\logic\Index())->search();
        return $this->ajaxReturn($result);
    }
    /**
     * 搜索商品
     */
    public function searchgoods()
    {
        $result =  (new \app\api\logic\Index())->searchgoods();
        return $this->ajaxReturn($result);
    }
    /**
     * 轮播图2
     */
    public function banner2()
    {
        $result =  (new \app\api\logic\Index())->banner2();
        return $this->ajaxReturn($result);
    }
    
    /**
     * 推荐2
     */
    public function activity2()
    {
        $result =  (new \app\api\logic\Index())->activity2();
        return $this->ajaxReturn($result);
    }

    /**
    *  首页接口
    */
    public function index(){
        $index =  (new \app\api\logic\Index())->index();
        return $this->ajaxReturn($index);
    }
	
	public function getshop(){
		$getshop =  (new \app\api\logic\Index())->getshop();
        return $this->ajaxReturn($getshop);
	}
	
    public function getcity()
    {
        $getcity =  (new \app\api\logic\Index())->getcity();
        return $this->ajaxReturn($getcity);
    }
}